<?php

namespace app\home\controller;

use think\Controller;
use app\common\model\Category;

class Base extends Controller
{
    //查询分类信息
    public function __construct()
    {
        parent::__construct();
        $data=Category::select();
        $list=get_tree_list($data->toArray());
        // dump($datas);
        $this->assign('list',$list);
    }
    // public function __construct()
    // {
    //     parent::__construct();
    //     $data=Category::select();
    //     $list=get_tree_list($data->toArray());
    //     // dump($list);
    //     $this->assign('list',$list);
    // }
}
